package studay.command;

/**
 * @program: 设计模式
 * @description:
 * @author: Tom
 * @create: 2022-01-08 17:51
 **/
public class OffCommand implements Command{

    private ConditionReceiver receiver;

    public OffCommand(ConditionReceiver receiver){
        this.receiver = receiver;
    }

    /**
     * 必须实现一个命令的调用
     */
    @Override
    public void execute() {

        System.out.println("OffCommand->execute");
        receiver.off();
    }
}
